#####Castillian Major Events#####
#By Joakim 'Greven' Bergqwist   #
#   Thomas 'Besuchov' Johansson #
#   Henrik 'Doomdark' Fhraeus  #
#################################

#Viva Espaa#
event = {

	id = 3556
	trigger = {
		owned = {
			province = 436
			data = -1
		}
		NOT = {
			exists = SPA
		}
	}
	random = no
	country = CAS
	name = "EVENTNAME3556"
	desc = "EVENTHIST3556"
	style = 1

	date = { day = 1 month = june year = 1476 }
	offset = 150
	deathdate = { day = 1 month = january year = 1490 }

	action_a ={				#Let us claim the name Kingdom of Spain#
		name = "ACTIONNAME3556A"
		command = { type = country which = SPA } #Action_b removed by Dmitriy#
	}
}

#Civil War in Castile#
event = {
	id = 3557	
	random = no
	country = CAS
	name = "EVENTNAME3557"
	desc = "EVENTHIST3557"
	style = 1

	date = { day = 1 month = june year = 1438 }
	offset = 150

	action_a = { # Support lvaro de Luna
		name = "ACTIONNAME3557A"
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revoltrisk which = 48 value = 5 }
		command = { type = stability value = 1 }
		command = { type = DIP which = 2 value = 120 }
		command = { type = ADM which = 2 value = 120 }
		command = { type = MIL which = 2 value = 120 }
	}

	action_b = { # Support the sons of Ferdinand
		name = "ACTIONNAME3557B"
		command = { type = stability value = -1 }
	}
}

# The Ascendancy of Carlos I #
event = {
	id = 3849
	random = no
	country = CAS
	name = "EVENTNAME3849"
	desc = "EVENTHIST3849"
	style = 2
	
	trigger = {
		vassal = { country = SPA country = CAS } 
	}

	date = { day = 24  month = january year = 1516 } # The day that Carlos I inherits the throne.
	offset = 30
	deathdate = { day = 24  month = april year = 1516 }

	action_a = { #The Kingdoms are one!#
		name = "ACTIONNAME3849A"
		command = { type = trigger which = 3848 } # Spain inherits Castille
	}
	action_b = { #Force Carlos to make concessions.#
		name = "ACTIONNAME3849B"
		command = { type = relation which = SPA value = -50 }
		command = { type = relation which = HAB value = -50 }
		command = { type = relation which = FRA value = 20 }
	}
	action_c ={ #No! Let us elect our own king instead.#
		name = "ACTIONNAME3849C"
		command = { type = breakvassal which = SPA }
		command = { type = relation which = SPA value = -150 }
		command = { type = relation which = HAB value = -150 }
		command = { type = relation which = FRA value = 50 }
	} 
}

#################################
#####    Castille Events   ######
######      by  Havard    #######
#################################

# The coup of Enrique of Aragon (1420) #

event = {
	id = 7101
	random = no
	country = CAS
	name = "EVENTNAME7101"
	desc = "EVENTHIST7101"
	style = 1

	date = { day = 1 month = january year = 1420 }
	offset = 300

	action_a = { 
		name = "ACTIONNAME7101A"
		command = { type = stability value = -3 }
	}
}

# The King's Constable (1423) #

event = {
	id = 7102
	random = no
	country = CAS
	name = "EVENTNAME7102"
	desc = "EVENTHIST7102"
	style = 1

	date = { day = 30 month = DECEMBER year = 1422 }

	action_a = { #Appoint Alvaro de Luna#
		name = "ACTIONNAME7102A"
		command = { type = ADM which = 2 value = 360 }
		command = { type = DIP which = 2 value = 360 }
		command = { type = MIL which = 2 value = 360 }
		command = { type = stability value = -2 }
		command = { type = revoltrisk which = 120 value = 4 }
		command = { type = wakeleader which = 08580 }
	}
	action_b = { #Appoint a less controversial candidate#
		name = "ACTIONNAME7102B"
		command = { type = stability value = 1 }
		command = { type = ADM which = 1 value = 180 }
		command = { type = sleepevent which = 3557 }
		command = { type = sleepevent which = 7103 }
	}
}

# The fall of Alvaro de Luna (1453)#

event = {
	id = 7103
	random = no
	country = CAS
	name = "EVENTNAME7103"
	desc = "EVENTHIST7103"
	style = 1

	date = { day = 22 month = june year = 1453 }

	action_a = { #Enough is enough!#
		name = "ACTIONNAME7103A"
		command = { type = stability value = -2 }
	}
}

# The divorce of prince Enrique (1453) #

event = {
	id = 7104
	random = no
	country = CAS
	name = "EVENTNAME7104"
	desc = "EVENTHIST7104"
	style = 1

	date = { day = 1 month = november year = 1453 }
	offset = 30

	action_a = { # Divorce her  #
		name = "ACTIONNAME7104A"
		command = { type = stability value = -2 }
		command = { type = relation which = NAV value = -100 }
	}
}
# The troubles of Enrique (1462-67) #
event = {
	id = 7105
	random = no
	country = CAS
	name = "EVENTNAME7105"
	desc = "EVENTHIST7105"
	style = 1

	date = { day = 1 month = january year = 1462 }
	offset = 30

	action_a = { #Ouch!#
		name = "ACTIONNAME7105A"
		command = { type = stability value = -4 }
		command = { type = revoltrisk which = 36 value = 3 }
	}
}

# Anarchy in Castile (1465) #
event = {
	id = 7106
	random = no
	country = CAS
	name = "EVENTNAME7106"
	desc = "EVENTHIST7106"
	style = 1

	date = { day = 1 month = january year = 1465 }
	offset = 30

	action_a = { #Double ouch!  #
		name = "ACTIONNAME7106A"
		command = { type = stability value = -2 }
		command = { type = revoltrisk which = 44 value = 3 }
	}
}

# The pact of Guisando (1468) #
event = {
	id = 7107
	random = no
	country = CAS
	name = "EVENTNAME7107"
	desc = "EVENTHIST7107"
	style = 1

	date = { day = 1 month = september year = 1468 }
	offset = 30

	action_a = { # Isabel#	
		name = "ACTIONNAME7107A"
		command = { type = stability value = 3 }
		command = { type = revoltrisk value = -3 }
		command = { type = relation which = POR value = -100 }
		command = { type = sleepevent which = 7111 }
	}
	action_b = { # Juana#
		name = "ACTIONNAME7107B"
		command = { type = stability value = -1 }
		command = { type = revoltrisk which = 60 value = 5 }
		command = { type = relation which = POR value = 100 }
		command = { type = sleepevent which = 7108 }
		command = { type = sleepevent which = 7110 }
	}
}

# Princess Isabel marries (1469)#
event = {
	id = 7108
	random = no
	country = CAS
	name = "EVENTNAME7108"
	desc = "EVENTHIST7108"
	style = 1

	date = { day = 1 month = january year = 1469 }
	offset = 300

	action_a = { # Fernando#
		name = "ACTIONNAME7108A"
		command = { type = relation which = POR value = -150 }
		command = { type = relation which = ARG value = 200 }
		command = { type = trigger which = 7109 }
	}
	action_b = { # Afonso#
		name = "ACTIONNAME7108B"
		command = { type = relation which = POR value = 200 }
		command = { type = relation which = ARG value = -150 }
		command = { type = sleepevent which = 7110 }
	}
	action_c = { # None#
		name = "ACTIONNAME7108C"
		command = { type = relation which = POR value = -50 }
		command = { type = relation which = ARG value = -50 }
		command = { type = sleepevent which = 7110 }
	}
}

# The Pact of Guisando cancelled by Enrique! (1469)#
event = {
	id = 7109
	random = no
	country = CAS
	name = "EVENTNAME7109"
	desc = "EVENTHIST7109"
	style = 1

	action_a = { # We can not accept this! #
		name = "ACTIONNAME7109A"
		command = { type = stability value = -3 }
		command = { type = revoltrisk which = 60 value = 5 } #Continued revolts#
	}	
}

# Reconciliation of Isabel and Enrique (1474)#
event = {
	id = 7110
	random = no
	country = CAS
	name = "EVENTNAME7110"
	desc = "EVENTHIST7110"
	style = 1

	date = { day = 1 month = january year = 1474 }
	offset = 300

	action_a = { # Great#
		name = "ACTIONNAME7110A"
		command = { type = stability value = 3 }
		command = { type = trigger which = 18028 }
	}
}


# Reconciliation of Isabel and Enrique (1474)#
# If Juana was preferred at Guisando         #
event = {
	id = 7111
	random = no
	country = CAS
	name = "EVENTNAME7110"
	desc = "EVENTHIST7111"
	style = 1

	date = { day = 1 month = january year = 1474 }
	offset = 300

	action_a = { # Great#
		name = "ACTIONNAME7110A"
		command = { type = stability value = 2 }
		command = { type = trigger which = 18028 }
	}
}

#################################
#####    Castille Events   ######
######      by  Garbon    #######
#################################

event = {
	id = 7120
	trigger = { exists = GRA
                	NOT = { exists = SPA }
			NOT = { event = 7124 }
                  }
	random = no
	country = CAS
	name = "EVENTNAME7120"
	desc = "EVENTHIST7120"
	style = 1
	date = { day = 27 month = december year = 1481 }
	offset = 20
	deathdate = { day = 1 month = january year = 1525 }
	action_a = {
		name = "ACTIONNAME7120A"
		command = { type = inf which = -2 value = 5000 }
		command = { type = relation which = GRA value = -200 }
		command = { type = casusbelli which = GRA value = 24 }
		command = { type = stability value = 1 }  
		command = { type = addcore which = 444 }
		command = { type = addcore which = 445 }
	}
}

event = {
	id = 7156
	trigger = {
		exists = TUR
		exists = TRI
		NOT = { exists = SPA }
		atwar = no
		NOT = { event = 7157 }
		NOT = { vassal = { country = CAS country = TRI } }
		NOT = { alliance = { country = CAS country = TRI } }
	}
	random = no
	country = CAS
	name = "EVENTNAME7156"
	desc = "EVENTHIST7156"
	style = 1
	date = { day = 1 month = november year = 1509 }
	offset = 30
	deathdate = { day = 1 month = january year = 1528 }
	action_a = {
		name = "ACTIONNAME7156A"
		command = { type = relation which = TRI value = -200 }
		command = { type = war which = TRI }
		command = { type = sleepevent which = 7157 }
		}
	action_b = {
		name = "ACTIONNAME7156B"
		command = { type = relation which = TRI value = -50 }
		command = { type = sleepevent which = 7157 }
		}
}

event = {
	id = 7158
	trigger = {
		owned   = { province = 740 data = -1 }
		control = { province = 740 data = -1 }
		exists = KNI
	}
	random = no
	country = CAS
	name = "EVENTNAME7158"
	desc = "EVENTHIST7158"
	style = 1
	date = { day = 1 month = january year = 1517 }
	offset = 30
	deathdate = { day = 1 month = january year = 1555 }
	action_a = {
		name = "ACTIONNAME7158A"
		command = { type = secedeprovince which = KNI value = 740 }
		command = { type = relation which = KNI value = -30 }
		command = { type = trigger which = 24054 }
		}
	action_b = {
		name = "ACTIONNAME7158B"
		command = { type = secedeprovince which = KNI value = 740 }
		command = { type = trigger which = 24054 }
		}
	action_c = {
		name = "ACTIONNAME7158C"
        	command = { type = treasury value = -50 }
		command = { type = inflation value = 2 }
       		command = { type = inf which = 740 value = 6000 }
		command = { type = province_revoltrisk which = 740 value = 5 }
		}
}

event = {
	id = 85059
	trigger = {
		exists = TUN
		exists = TUR
	}
	random = no
	country = SPA
	name = "EVENTNAME85059"
	desc = "EVENTHIST85059"
	style = 1
	date = { day = 1 month = january year = 1534 }
	action_a = {
		name = "ACTIONNAME85059A"
		command = { type = vassal which = TUN }
		command = { type = relation which = TUN value = 100 }
		}
	action_b = {
		name = "ACTIONNAME85059B"
		command = { type = relation which = TUN value = -200 }
		command = { type = casusbelli which = TUN value = 12 }
		}
}

###########################
####  Castille Events  ####
####      by Crook     ####
###########################

#Santa Hermandad#
event = {
	id = 7160
	random = no
	country = CAS
	name = "EVENTNAME7160"
	desc = "EVENTHIST7160"
	style = 1
	date = { day = 1 month = january year = 1476 }
	offset = 300
	deathdate = { day = 1 month = january year = 1480 }

	action_a = { 
		name = "ACTIONNAME7160A"
		command = { type = domestic which = centralization value = 1 }
		command = { type = stability value = 1 }
		command = { type = gainbuilding which = -1 value = cityrights }
		command = { type = gainbuilding which = -1 value = cityrights }
	}
}
